import React, { Component } from 'react'
import { NavBar, Toast } from 'antd-mobile'
import { hashHistory } from 'react-router'
import '../../assets/css/detail/k-navbar.less'
import KLogo from '../KLogo'
export default class KNavBar extends Component {
    goToHome = () => {
        Toast.show({icon:'loading',content:'加载中...',duration:500})
        setTimeout(() => {
            hashHistory.replace('/home')
        }, 500);
    }
    render() {
        return (
            <div className='k-navbar'>
                <NavBar
                    mode="light"
                    onBack={this.goToHome}
                >
                    <KLogo height='30px' />
                </NavBar>
            </div>
        )
    }
}
